package model;

import java.io.IOException;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import service.FriendSale;
import converter.BeanJsonConverter;

public class SaleData implements Serializable {

	public String id;
	public String domain;
	public int price;
	public int cash;
	public List<String> slaves;
	public Person master;
	public List<History> historys;

	public String nickname;

	public Date buyUntil;

	public String status;

	public Person person;

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public int getCash() {
		return cash;
	}

	public void setCash(Integer cash) {
		this.cash = cash;
	}

	public List<History> getHistory() {
		return historys;
	}

	public void setHistory(List<History> history) {
		this.historys = history;
	}

	public Person getMaster() {
		return master;
	}

	public void setMaster(Person master) {
		this.master = master;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(Integer price) {
		this.price = price;
	}

	public List<String> getSlaves() {
		return slaves;
	}

	public void setSlaves(List<String> slaves) {
		this.slaves = slaves;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getBuyUntil() {
		return buyUntil;
	}

	public String displayBuyUntil() {
		SimpleDateFormat sdf = new SimpleDateFormat();
		sdf.applyPattern("yyyy-MM-dd hh:mm:ss");// hh:mm:ss");
		return sdf.format(this.buyUntil);
	}

	public void setBuyUntil(Date buyUntil) {
		this.buyUntil = buyUntil;
	}

	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}
}
